package org.lboot.rabbit.test.listener;

import cn.hutool.core.util.StrUtil;
import com.rabbitmq.client.CancelCallback;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.DeliverCallback;
import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.lboot.rabbit.client.RocketRabbitClient;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.nio.charset.StandardCharsets;

@Slf4j
@Component
@AllArgsConstructor
public class RabbitCustomerListener {
    RocketRabbitClient client;


//    @RabbitListener(queues="hello")
//    @SneakyThrows
//    public void receive(Message message) {
//        // byte[] 转化为 string
//        String result = new String(message.getBody(), StandardCharsets.UTF_8);
//        log.info(result);
//    }


}
